package com.group3.group3.user.repository;

import com.group3.group3.mybatis.entity.PtMenuEntity;
import com.group3.group3.mybatis.entity.PtUserEntity;
import com.group3.group3.mybatis.flexigrid.PagingBean;
import com.group3.group3.mybatis.ztree.ZtreeEntity;
import com.group3.group3.user.entity.UserSearchEnity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface UserDao {

    PtUserEntity queryUserInfoByUserName(@Param("userName") String userName);
    List<PtMenuEntity> queryMenuInfoByLang(@Param("userUuid")String userUuid ,@Param("lang")String lang);

    List<PtUserEntity> queryUserListByPadding(@Param("search")UserSearchEnity search,@Param("paging") PagingBean paging);

    Integer queryUserListTotal(@Param("search")UserSearchEnity search);

    void deleteUserById(@Param("userUuid")String userUuid);

    List<ZtreeEntity> getRoleZtreeList();

    void deleteUserRefRole(@Param("userUuid")String userUuid);

    void insertUserRefRole(@Param("userUuid")String userUuid,@Param("roleUuid") String roleUuid);

    List<String> queryRoleRefUserByUserId(@Param("userUuid") String userUuid);

    List<String> queryMenuInfoList(@Param("userUuid")String userUuid);

    void addUser(@Param("userUuid") String uuid,@Param("userNick") String userNick,@Param("userName") String userName,@Param("password") String password,@Param("mobile") String mobile,@Param("email") String email);

    void updataUser(@Param("userUuid") String uuid,@Param("userNick") String userNick,@Param("userName") String userName,@Param("password") String password,@Param("mobile") String mobile,@Param("email") String email);

    void deleteUser(@Param("userUuid") String uuid);
}
